<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>017-改变This指向.html</title>
</head>
<body>
	
</body>
<script>
	function show(n1,n2){
		console.log(this,n1,n2);
	}
	// show();//window
	// window.show();//window
	// new show();//show ={}

	// show(1,2);//window
	// show.call(1,2);//window
	// show.call({name:"chris"},1,2);

	// show(1,2);
	// show.apply(1,[2]);
	// show.apply({name:"chris"},[1,2])	


	// show(1,2);
	// var result = show.bind({name:"chris"});
	// console.log(result);
	// result(1,2);



	// show.call({name:'Chris'},1,2);
	// show.apply({name:'Chris'},[1,2]);
	// var fn = show.bing({name:'Chris'});
	// console.log(fn);
	// fn(1,2);

	show.call(null,1,2);
	show.apply(null,[1,2]);
	var fn = show.bind(null);
	console.log(fn);
	fn(1,2);
</script>
</html>